package br.com.taskManager.hibernate;

import org.apache.log4j.Logger;
import org.hibernate.Session;

public class ConectaHibernatePostgresql {
	
	private static final Logger logger = Logger.getLogger(ConectaHibernatePostgresql.class);

	public static void main(String[] args) {
		Session sessao = null;
		try {
			sessao = HibernateUtil.getSessionFactory().openSession();
/*			Usuario u = new Usuario();
			u.setNome("felipe");
			u.setUsername("teste2ssss");
			u.setPassword("123");
			Transaction tx = sessao.beginTransaction();
			sessao.save(u);
			tx.commit();*/
			logger.debug("teste");
			System.out.println("Conectou!");
		} finally {
			sessao.close();
		}
	}
}
